package com.ruoyi;

import com.ruoyi.common.core.redis.RedisCache;
import com.ruoyi.framework.security.h1w.H1wAuthenticationProvider;
import com.ruoyi.web.cq.CQResolver;
import net.lz1998.cq.CQGlobal;
import net.lz1998.cq.EnableCQ;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.ComponentScan;

/**
 * 启动程序
 *
 * @author ruoyi
 */
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
public class RuoYiApplication {
    public static void main(String[] args) {

        SpringApplication springApplication = new SpringApplication(RuoYiApplication.class);
        ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);
        // System.setProperty("spring.devtools.restart.enabled", "false");

        // 获取Spring IOC容器中的Service并注入
        RedisCache redisUtils = configurableApplicationContext.getBean(RedisCache.class);
        H1wAuthenticationProvider.setRedisUtils(redisUtils);

        System.out.println("(♥◠‿◠)ﾉﾞ  若依启动成功   ლ(´ڡ`ლ)ﾞ");
    }
}
